import {
  ErrorRequestHandler,
  Request,
  Response,
  response,
  NextFunction,
} from "express";
import { err } from "./infoerr";

export default function (req: Request, res: Response, next: NextFunction) {
  console.log(req.signedCookies.feifan);

  if (req.signedCookies.feifan.right == "1") {
    return next();
  } else err(res, "权限不足");
}
